<template>
  <div id="lotteryHall">
    <div class="lottery_hall flex">
      <div class="hall_left">
        <my-gamelist></my-gamelist>
      </div>
      <div class="hall_right">
        <router-view></router-view>
      </div>
    </div>
  </div>
</template>

<script>
  import gamelist from './gamenav.vue'
  import detail from './gamelist.vue'

  export default {
    data() {
      return {
      }
    },
    created() {
    	let m = this.$store.state.allGameList
    	let n = JSON.parse(window.sessionStorage.getItem('allGameList'))
    	if(m.length === 0 && n.length > 0) {
    		this.$store.commit('c_allGameList', n)
    	}
    	
    	let h = JSON.parse(window.sessionStorage.getItem('hallLeftNav'))
    	if(h) {
    		this.$store.commit('c_hallLeftNav', h)
    	}
    	
    },
    methods: {},
    components: {
      'my-gamelist': gamelist,
      'my-detail': detail
    }

  }
</script>

<style lang="less">
  #lotteryHall {
    min-height: 200px;
    .lottery_hall {
      height: 100%;
    }
    .hall_left {
      width: 15%;
      height: 100%;
    }
    .hall_right {
      flex: 1;
      height: 100%;
      background-color: #f6f6f6;
    }
  }
</style>
